央视4K1[央].js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. var rule = {
  2. title:'央视频',
  3. host:'https://api.cntv.cn',
  4. homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json',
  5. //lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=20&serviceId=tvcctv&t=jsonp&cb=Callback
  6. url:'/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&t=json',
  7. searchUrl:'',
  8. searchable:0,
  9. quickSearch:0,
  10. class_name: '4K专区&电视剧&动画片&栏目大全&特别节目&纪录片',
  11. class_url: '4K专区&电视剧&动画片&栏目大全&特别节目&纪录片',
  12. filterable: 1,
  13. filter_url: 'channel={{fl.channel}}&sc={{fl.sc}}&year={{fl.year}}',
  14. filter: {
  15. "栏目大全":[
  16. {"key":"channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"CCTV-1综合,CCTV-1高清,CCTV-1综合高清"},{"n":"CCTV-2财经","v":"CCTV-2财经,CCTV-2高清,CCTV-2财经高清"},{"n":"CCTV-3综艺","v":"CCTV-3综艺,CCTV-3高清,CCTV-3综艺高清"},{"n":"CCTV-4中文国际","v":"CCTV-4中文国际,CCTV-4高清,CCTV-4中文国际(亚)高清"},{"n":"CCTV-5体育","v":"CCTV-5体育,CCTV-5高清,CCTV-5体育高清"},{"n":"CCTV-6电影","v":"CCTV-6电影,CCTV-6高清,CCTV-6电影高清"},{"n":"CCTV-7国防军事","v":"CCTV-7国防军事,CCTV-7高清,CCTV-7国防军事高清"},{"n":"CCTV-8电视剧","v":"CCTV-8电视剧,CCTV-8高清,CCTV-8电视剧高清"},{"n":"CCTV-9纪录","v":"CCTV-9纪录,CCTV-9高清,CCTV-9纪录高清"},{"n":"CCTV-10科教","v":"CCTV-10科教,CCTV-10高清,CCTV-10科教高清"},{"n":"CCTV-11戏曲","v":"CCTV-11戏曲,CCTV-11高清,CCTV-11戏曲高清"},{"n":"CCTV-12社会与法","v":"CCTV-12社会与法,CCTV-12高清,CCTV-12社会与法高清"},{"n":"CCTV-13新闻","v":"CCTV-13新闻,CCTV-13高清,CCTV-13新闻高清"},{"n":"CCTV-14少儿","v":"CCTV-14少儿,CCTV-14高清,CCTV-14少儿高清"},{"n":"CCTV-15音乐","v":"CCTV-15音乐,CCTV-15高清,CCTV-15音乐高清"},{"n":"CCTV-17农业农村","v":"CCTV-17农业农村,高清,高清"}]},
  17. {"key":"sc","name":"类型","value":[{"n":"全部","v":""},{"n":"新闻","v":"新闻"},{"n":"经济","v":"经济"},{"n":"综艺","v":"综艺"},{"n":"体育","v":"体育"},{"n":"军事","v":"军事"},{"n":"影视","v":"影视"},{"n":"科教","v":"科教"},{"n":"戏曲","v":"戏曲"},{"n":"青少","v":"青少"},{"n":"音乐","v":"音乐"},{"n":"社会","v":"社会"},{"n":"公益","v":"公益"},{"n":"其他","v":"其他"}]},
  18. ],
  19. "纪录片":[
  20. {"key":"channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"CCTV-1综合,CCTV-1高清,CCTV-1综合高清"},{"n":"CCTV-2财经","v":"CCTV-2财经,CCTV-2高清,CCTV-2财经高清"},{"n":"CCTV-3综艺","v":"CCTV-3综艺,CCTV-3高清,CCTV-3综艺高清"},{"n":"CCTV-4中文国际","v":"CCTV-4中文国际,CCTV-4高清,CCTV-4中文国际(亚)高清"},{"n":"CCTV-5体育","v":"CCTV-5体育,CCTV-5高清,CCTV-5体育高清"},{"n":"CCTV-6电影","v":"CCTV-6电影,CCTV-6高清,CCTV-6电影高清"},{"n":"CCTV-7国防军事","v":"CCTV-7国防军事,CCTV-7高清,CCTV-7国防军事高清"},{"n":"CCTV-8电视剧","v":"CCTV-8电视剧,CCTV-8高清,CCTV-8电视剧高清"},{"n":"CCTV-9纪录","v":"CCTV-9纪录,CCTV-9高清,CCTV-9纪录高清"},{"n":"CCTV-10科教","v":"CCTV-10科教,CCTV-10高清,CCTV-10科教高清"},{"n":"CCTV-11戏曲","v":"CCTV-11戏曲,CCTV-11高清,CCTV-11戏曲高清"},{"n":"CCTV-12社会与法","v":"CCTV-12社会与法,CCTV-12高清,CCTV-12社会与法高清"},{"n":"CCTV-13新闻","v":"CCTV-13新闻,CCTV-13高清,CCTV-13新闻高清"},{"n":"CCTV-14少儿","v":"CCTV-14少儿,CCTV-14高清,CCTV-14少儿高清"},{"n":"CCTV-15音乐","v":"CCTV-15音乐,CCTV-15高清,CCTV-15音乐高清"},{"n":"CCTV-17农业农村","v":"CCTV-17农业农村,高清,高清"}]},
  21. {"key":"sc","name":"类型","value":[{"n":"全部","v":""},{"n":"人文历史","v":"人文历史"},{"n":"人物","v":"人物"},{"n":"军事","v":"军事"},{"n":"探索","v":"探索"},{"n":"社会","v":"社会"},{"n":"时政","v":"时政"},{"n":"经济","v":"经济"},{"n":"科技","v":"科技"}]},
  22. {"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"}]},
  23. ],
  24. "特别节目":[
  25. {"key":"channel","name":"频道","value":[{"n":"全部","v":""},{"n":"CCTV-1综合","v":"CCTV-1综合,CCTV-1高清,CCTV-1综合高清"},{"n":"CCTV-2财经","v":"CCTV-2财经,CCTV-2高清,CCTV-2财经高清"},{"n":"CCTV-3综艺","v":"CCTV-3综艺,CCTV-3高清,CCTV-3综艺高清"},{"n":"CCTV-4中文国际","v":"CCTV-4中文国际,CCTV-4高清,CCTV-4中文国际(亚)高清"},{"n":"CCTV-5体育","v":"CCTV-5体育,CCTV-5高清,CCTV-5体育高清"},{"n":"CCTV-6电影","v":"CCTV-6电影,CCTV-6高清,CCTV-6电影高清"},{"n":"CCTV-7国防军事","v":"CCTV-7国防军事,CCTV-7高清,CCTV-7国防军事高清"},{"n":"CCTV-8电视剧","v":"CCTV-8电视剧,CCTV-8高清,CCTV-8电视剧高清"},{"n":"CCTV-9纪录","v":"CCTV-9纪录,CCTV-9高清,CCTV-9纪录高清"},{"n":"CCTV-10科教","v":"CCTV-10科教,CCTV-10高清,CCTV-10科教高清"},{"n":"CCTV-11戏曲","v":"CCTV-11戏曲,CCTV-11高清,CCTV-11戏曲高清"},{"n":"CCTV-12社会与法","v":"CCTV-12社会与法,CCTV-12高清,CCTV-12社会与法高清"},{"n":"CCTV-13新闻","v":"CCTV-13新闻,CCTV-13高清,CCTV-13新闻高清"},{"n":"CCTV-14少儿","v":"CCTV-14少儿,CCTV-14高清,CCTV-14少儿高清"},{"n":"CCTV-15音乐","v":"CCTV-15音乐,CCTV-15高清,CCTV-15音乐高清"},{"n":"CCTV-17农业农村","v":"CCTV-17农业农村,高清,高清"}]},
  26. {"key":"sc","name":"类型","value":[{"n":"全部","v":""},{"n":"新闻","v":"新闻"},{"n":"经济","v":"经济"},{"n":"综艺","v":"综艺"},{"n":"体育","v":"体育"},{"n":"军事","v":"军事"},{"n":"影视","v":"影视"},{"n":"科教","v":"科教"},{"n":"戏曲","v":"戏曲"},{"n":"青少","v":"青少"},{"n":"音乐","v":"音乐"},{"n":"社会","v":"社会"},{"n":"公益","v":"公益"},{"n":"其他","v":"其他"}]},
  27. ],
  28. "电视剧":[
  29. {"key":"sc","name":"类型","value":[{"n":"全部","v":""},{"n":"谍战","v":"谍战"},{"n":"悬疑","v":"悬疑"},{"n":"刑侦","v":"刑侦"},{"n":"历史","v":"历史"},{"n":"古装","v":"古装"},{"n":"武侠","v":"武侠"},{"n":"军旅","v":"军旅"},{"n":"战争","v":"战争"},{"n":"喜剧","v":"喜剧"},{"n":"青春","v":"青春"},{"n":"言情","v":"言情"},{"n":"偶像","v":"偶像"},{"n":"家庭","v":"家庭"},{"n":"年代","v":"年代"},{"n":"革命","v":"革命"},{"n":"农村","v":"农村"},{"n":"都市","v":"都市"},{"n":"其他","v":"其他"}]},
  30. {"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"},{"n":"1999","v":"1999"},{"n":"1998","v":"1998"},{"n":"1997","v":"1997"}]},
  31. ],
  32. },
  33. headers:{
  34. 'User-Agent':'PC_UA'
  35. },
  36. timeout:10000,
  37. play_parse:true,
  38. lazy: $js.toString(() => {
  39. let id = input.split("|")[0];
  40. let k4 = input.split("|")[1];
  41. if (k4 === '7') {
  42. input = 'https://hls.cntv.myalicdn.com//asp/hls/4000/0303000a/3/default/' + id + '/4000.m3u8';
  43. } else {
  44. input = 'https://hls.cntv.myalicdn.com//asp/hls/2000/0303000a/3/default/' + id + '/2000.m3u8';
  45. }
  46. //https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid='+input
  47. }),
  48. limit:6,
  49. double:false,
  50. 推荐: $js.toString(() => {
  51. var d = [];
  52. var list = JSON.parse(request(input)).response.docs;
  53. list.forEach(it => {
  54. // 一级标题
  55. let title1 = it.column_name;
  56. // 一级描述
  57. let desc1 = it.channel_name;
  58. // 一级图片URL
  59. let picUrl1 = it.column_logo;
  60. // 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
  61. let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
  62. d.push({
  63. desc : desc1,
  64. title : title1,
  65. pic_url : picUrl1,
  66. url : url1
  67. })
  68. })
  69. setResult(d);
  70. }),
  71. 一级: $js.toString(() => {
  72. var d = [];
  73. if(MY_CATE==='栏目大全') {
  74. var list = JSON.parse(request(HOST+'/lanmu/columnSearch?&fl=&fc=&cid=&p='+MY_PAGE+'&n=500&serviceId=tvcctv&t=json')).response.docs;
  75. list.forEach(it => {
  76. // 一级标题
  77. let title1 = it.column_name;
  78. // 一级描述
  79. let desc1 = it.channel_name;
  80. // 一级图片URL
  81. let picUrl1 = it.column_logo;
  82. // 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 更新至)
  83. let url1 = it.lastVIDE.videoSharedCode + '|' + '' + '|' + it.column_firstclass + '|' + it.column_name + '|' + '' + '|' + it.column_playdate + '|' + it.channel_name + '|' + it.column_brief + '|' + it.column_logo + '|' + '' + '|' + it.lastVIDE.videoTitle;
  84. d.push({
  85. desc : desc1,
  86. title : title1,
  87. pic_url : picUrl1,
  88. url : url1
  89. })
  90. })
  91. }
  92. else if(MY_CATE==='4K专区') {
  93. var list = JSON.parse(request(HOST+'/NewVideo/getLastVideoList4K?serviceId=cctv4k&cid=&p='+MY_PAGE+'&n=500&serviceId=tvcctv&t=json')).data.list;
  94. list.forEach(it => {
  95. // 一级标题
  96. let title1 = it.title;
  97. // 一级描述
  98. let desc1 = it.sc + ((typeof it.year==='undefined' || it.year==='')?'':('•'+it.year)) + ((typeof it.count==='undefined' || it.count==='')?'':('•共' + it.count + '集'));
  99. // 一级图片URL
  100. let picUrl1 = it.image;
  101. // 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
  102. let url1 = it.id + '|' + it.area + '|' + it.sc + '|' + it.title + '|' + it.actors + '|' + it.year + '|' + it.channel + '|' + it.brief + '|' + it.image + '|' + it.count + '|' + '' + '|' + MY_CATE;
  103. d.push({
  104. desc : desc1,
  105. title : title1,
  106. pic_url : picUrl1,
  107. url : url1
  108. })
  109. })
  110. }
  111. else {
  112. var channelMap = {
  113. "特别节目": "CHAL1460955953877151",
  114. "纪录片": "CHAL1460955924871139",
  115. "电视剧": "CHAL1460955853485115",
  116. "动画片": "CHAL1460955899450127",
  117. };
  118. var list = JSON.parse(request(input+'&channelid='+channelMap[MY_CATE]+'&fc='+MY_CATE+'&p='+MY_PAGE)).data.list;
  119. list.forEach(it => {
  120. // 一级标题
  121. let title1 = it.title;
  122. // 一级描述
  123. let desc1 = it.sc + ((typeof it.year==='undefined' || it.year==='')?'':('•'+it.year)) + ((typeof it.count==='undefined' || it.count==='')?'':('•共' + it.count + '集'));
  124. // 一级图片URL
  125. let picUrl1 = it.image;
  126. // 一级URL(id 地区 类型 标题 演员 年份 频道 简介 图片 集数)
  127. let url1 = it.id + '|' + it.area + '|' + it.sc + '|' + it.title + '|' + it.actors + '|' + it.year + '|' + it.channel + '|' + it.brief + '|' + it.image + '|' + it.count + '|' + '' + '|' + MY_CATE;
  128. d.push({
  129. desc : desc1,
  130. title : title1,
  131. pic_url : picUrl1,
  132. url : url1
  133. })
  134. })
  135. }
  136. setResult(d);
  137. }),
  138. 二级: $js.toString(() => {
  139. let info = input.split("|");
  140. VOD = {
  141. vod_id: info[0],
  142. vod_name: info[3],
  143. vod_pic: info[8],
  144. type_name: info[2]==='undefined'?'':info[2],
  145. vod_year: info[5]==='undefined'?'':info[5],
  146. vod_area: info[1]==='undefined'?'':info[1],
  147. vod_remarks: info[9]===''?('更新至'+info[10]):('共'+info[9]+'集'),
  148. vod_director: info[6]==='undefined'?'':info[6],
  149. vod_actor: info[4]==='undefined'?'':info[4],
  150. // vod_content: info[7]==='undefined'?'':info[7],
  151. };
  152. var modeMap = {
  153. "4K专区": "0",
  154. "特别节目": "0",
  155. "纪录片": "0",
  156. "电视剧": "0",
  157. "动画片": "1",
  158. };
  159. var ctid = info[0].replace('https://api.cntv.cn/lanmu/','');
  160. var link = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id='+ctid+'&serviceId=tvcctv&p=1&n=100&mode='+modeMap[info[11]]+'&pub=1';
  161. var html = JSON.parse(request(link));
  162. var playUrls;
  163. if(html.errcode==='1001'){
  164. var guid = info[0].replace('https://api.cntv.cn/lanmu/','');
  165. var link1 = 'https://api.cntv.cn/video/videoinfoByGuid?guid='+guid+'&serviceId=tvcctv';
  166. ctid = JSON.parse(request(link1)).ctid.replace('https://api.cntv.cn/lanmu/','');
  167. var link2 = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?id='+ctid+'&d=&p=1&n=100&sort=desc&mode=0&serviceId=tvcctv&t=json';
  168. playUrls = JSON.parse(request(link2)).data.list;
  169. } else {
  170. playUrls = html.data.list;
  171. // 获取更多数据,暂不需要
  172. var flag = '';
  173. if(playUrls===''){
  174. flag = 'true';
  175. }
  176. var page = 1;
  177. while(flag===''){
  178. page = page+1;
  179. var burl = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id='+ctid+'&serviceId=tvcctv&p='+page+'&n=100&mode='+modeMap[info[11]]+'&pub=1';
  180. var list = JSON.parse(request(burl)).data.list;
  181. if (list.length!==0){
  182. list.forEach(it => {
  183. playUrls.push(it);
  184. })
  185. continue;
  186. }else{
  187. flag='true';
  188. break;
  189. }
  190. }
  191. }
  192. let playFrom = [];
  193. let playList = [];
  194. playFrom.append('央视频');
  195. playUrls.forEach(it => {
  196. playList.append(playUrls.map(function(it) {
  197. return it.title + "$" + it.guid + "|" + it.type
  198. }).join("#"))
  199. });
  200. // 最后封装所有线路
  201. // let vod_content = playUrls;
  202. let vod_play_from = playFrom.join('$$$');
  203. let vod_play_url = playList.join('$$$');
  204. VOD['vod_play_from'] = vod_play_from;
  205. VOD['vod_play_url'] = vod_play_url;
  206. }),
  207. 搜索:'',
  208. }